<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.10/vue.js"></script>
</head>
<body>
<div id="app">
<!-- 单独使用复选框时,收集的是布尔值 -->
  <input type="checkbox" v-model="isAgree"/>:我同意此协议
    <hr/>
    <h2>用户{{isAgree?'同意':'不同意'}}此协议</h2>
</div>
<script>
  const vm = new Vue({
    el:"#app",
    data(){
      return{
        isAgree:false
      }
    }
  })
</script>
</body>
</html>